﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Enums;
using Wallpaper.Models.Interfaces;

namespace Wallpaper.Models.Entities
{
    public class Role : BaseEntity, IHasTimestamps,ISoftDelete
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; }

        /// <summary>
        /// 角色编码（唯一标识，用于程序内部识别）
        /// </summary>
        public string RoleCode { get; set; }

        /// <summary>
        /// 角色描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 启用状态：true-启用，false-禁用
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 软删除标志：true-已删除，false-正常
        /// </summary>
        public bool IsDeleted { get; set; }

        public DateTime CreatedAt { get; set; }

        public DateTime? UpdatedAt { get; set; }


        // 导航属性
        public virtual ICollection<RoleMenu> RoleMenus { get; set; } = new List<RoleMenu>();
        public virtual ICollection<Admin> Admins { get; set; } = new List<Admin>();

        public ICollection<RolePermission> RolePermissions { get; set; } = new List<RolePermission>();
    }
}
